<div class="content fixed-fluid">
    <div class="row-fluid">
        <div class="main-content">
            <div class="numberofmentions">
                <div class="mozaic-widget top-stream-info mozaic-initialized widget-new_items" data-guid="widget-584" data-params="{&quot;channels&quot;:{&quot;/items&quot;:&quot;/signals-582&quot;,&quot;/filters&quot;:&quot;/filters-4&quot;},&quot;single_item&quot;:&quot;signal&quot;,&quot;multiple_items&quot;:&quot;signals&quot;,&quot;scrollable_target&quot;:&quot;.signals .list-viewport&quot;}" data-widget="new_items" id="new-mentions-widget" style="display: none;"></div>
            </div>

            <div class="signals mozaic-widget skip-loading-animation mozaic-initialized widget-expanding_signal_list" data-guid="widget-585" data-params="{&quot;channels&quot;:{&quot;/signals&quot;:&quot;/signals-582&quot;,&quot;/annotables&quot;:&quot;/signals-582&quot;,&quot;/items&quot;:&quot;/signals-582&quot;,&quot;/streams&quot;:&quot;/streams-2&quot;,&quot;/tags&quot;:&quot;/tags-3&quot;,&quot;/social_profiles&quot;:&quot;/social_profiles-5&quot;,&quot;/users&quot;:&quot;/users-0&quot;,&quot;/filters&quot;:&quot;/filters-4&quot;},&quot;filter_key&quot;:&quot;id&quot;,&quot;list_widget&quot;:&quot;signals&quot;,&quot;item_widget&quot;:&quot;extended_signal_wrapper&quot;,&quot;header_widget&quot;:&quot;signal_list_header&quot;,&quot;scroll_channel&quot;:true}" data-widget="expanding_signal_list">

                <div class="mozaic-widget list-header mozaic-initialized widget-signal_list_header" data-guid="widget-592" data-params="{&quot;channels&quot;:{&quot;/signals&quot;:&quot;/signals-582&quot;,&quot;/annotables&quot;:&quot;/signals-582&quot;,&quot;/items&quot;:&quot;/signals-582&quot;,&quot;/streams&quot;:&quot;/streams-2&quot;,&quot;/tags&quot;:&quot;/tags-3&quot;,&quot;/social_profiles&quot;:&quot;/social_profiles-5&quot;,&quot;/users&quot;:&quot;/users-0&quot;,&quot;/filters&quot;:&quot;/filters-4&quot;}}" data-widget="signal_list_header">
                    <!--start template: templates/signals/signal_list_header.hjs -->

                    <div class="signal-list-header">
                        <h1 class="stream-title"><em class="icon-signals"></em><span>Signals</span></h1><a class="btn btn-filter-bar back-btn pull-right"><em class="icon-back"></em>Back</a>
                    </div><!-- end template: templates/signals/signal_list_header.hjs -->
                </div>

                <div class="list-viewport">
                    <ul class="mozaic-widget list mozaic-initialized widget-signals" data-guid="widget-593" data-params="{&quot;channels&quot;:{&quot;/signals&quot;:&quot;/signals-582&quot;,&quot;/annotables&quot;:&quot;/signals-582&quot;,&quot;/items&quot;:&quot;/signals-582&quot;,&quot;/streams&quot;:&quot;/streams-2&quot;,&quot;/tags&quot;:&quot;/tags-3&quot;,&quot;/social_profiles&quot;:&quot;/social_profiles-5&quot;,&quot;/users&quot;:&quot;/users-0&quot;,&quot;/filters&quot;:&quot;/filters-4&quot;}}" data-widget="signals">
                        <?php include "/View/Signal/SingleSignal.php"; ?>
                    </ul>
                </div>
                <div class="close-preview">
                    <a onclick="hidePreview()">Close</a>
                </div>
                <div class="signal-preview">
                    <iframe src="" id="signal-preview"></iframe>
                </div>
            </div>
        </div>
    </div>

    <div class="annotables-replies-content">
        <div class="annotations-holder-container">
            <div class="mozaic-widget mozaic-initialized widget-annotable_tasks_and_posts empty" data-guid="widget-693" data-params="{&quot;base_id&quot;:&quot;27268066&quot;,&quot;channels&quot;:{&quot;/tasks&quot;:&quot;/tasks-681&quot;,&quot;/posts&quot;:&quot;/social_posts-682&quot;,&quot;/social_profiles&quot;:&quot;/social_profiles-5&quot;,&quot;/users&quot;:&quot;/users-0&quot;,&quot;/annotables&quot;:&quot;/signals-582&quot;,&quot;/streams&quot;:&quot;/streams-2&quot;}}" data-widget="annotable_tasks_and_posts">
                <!--start template: templates/annotable/annotable_tasks_and_posts.hjs -->

                <div class="tasks-and-posts">
                    <div class="annotable-tasks-and-posts"></div>

                    <div class="clear"></div>
                </div><!-- end template: templates/annotable/annotable_tasks_and_posts.hjs -->
            </div>
        </div>
    </div>
</div>

<script>
    var page = 0;
    var pause;
    $('.list-viewport').on('scroll', function()
    {
        if (!pause) {
            lastLi = $('.list-viewport ul').first().children('li').last();
            if (lastLi.offset().top + lastLi.height() <= $(window).height())
            {
                page++;
                streamId = window.location.href.split('#')[1].split('/')[1];
                filter = $(this).parents('.opened').attr('id');
                dateFrom = $('#from').datepicker().val();
                dateTo = $('#to').datepicker().val();
                index = 10 * (page - 1);
                pause = true;
                $.post("/buzzPulse/loadStream/" + streamId + "/" + dateFrom + "/" + dateTo + '/' + index + '/10', function(data) {
                    $('.list-viewport ul').html($('.list-viewport ul').html() + data);
                    pause = false;
                });
            }
        }
    });
</script>